package org.example.intelligent_education.service;

import org.example.intelligent_education.mapper.CourseMapper;
import org.example.intelligent_education.model.CourseInfo;
import org.example.intelligent_education.model.CourseSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CourseService {
    @Autowired
    private CourseMapper courseMapper;

    public CourseInfo getCourseInfoByName(String cname) {
        return courseMapper.getCourseInfoByName(cname);
    }

    public List<CourseInfo> getAllCourseInfo() {
        return courseMapper.getAllCourseInfo();
    }

    public List<String> getAllCourseClassify(){
        return courseMapper.getAllCourseClassify();
    }
    public List<CourseInfo> getCourseInfoByCaname(String caname){
        return courseMapper.getCourseInfoByCaname(caname);
    }

    public CourseSource getCourseSourceByCid(int cid){
        return courseMapper.getCourseSourceByCid(cid);
    }
}
